Building

Build

  • Compiles, generates executable.

    odin build .
    

Run

  • Compile, generate executable, run executable.

    odin run .
    
  • .  refers to the directory.

  • Odin thinks in terms of directory-based packages. The odin build <dir>  command takes all the files in the directory <dir> , compiles them into a package and then turns that into an executable. You can also tell it to treat a single file as a complete package by adding -file , like so:

    odin run hellope.odin -file
    

Help

  • odin build -help

  • Output path:

    • odin build . -out:foo.exe

    • odin build . -out:out/odin-engine.exe

      • The directory is not created by default, so if the out  dir doesn't exist it will give an error in the build; use mkdir  beforehand.

Subsystems

Remove terminal from executable
  • For Windows:

    • -subsystem:windows .